﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ZhouYu.NewWorld.DAL
{
    using System;
    using System.Data.Entity;
    using System.Data.Entity.Infrastructure;
    using ZhouYu.NewWorld.Model;

    public partial class SyDbContext : DbContext
    {
        public SyDbContext() : base("name=newworldEntities")
        {
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<UserInfo>()
            .ToTable("userinfo");
            modelBuilder.Entity<Arealocation>()
            .ToTable("arealocation");
            modelBuilder.Entity<Backcolumn>()
            .ToTable("backcolumn");
            modelBuilder.Entity<Brand>()
            .ToTable("brand");
            modelBuilder.Entity<Cashnumber>()
            .ToTable("cashnumber");
            modelBuilder.Entity<Cashnumber_record>()
            .ToTable("cashnumber_record");
            modelBuilder.Entity<Category>()
            .ToTable("category");
            modelBuilder.Entity<Cateraccommod>()
            .ToTable("cateraccommod");
            modelBuilder.Entity<Citylocation>()
            .ToTable("citylocation");
            modelBuilder.Entity<Colleague>()
            .ToTable("colleague");
            modelBuilder.Entity<Company>()
            .ToTable("company");
            modelBuilder.Entity<Countrylocation>()
            .ToTable("countrylocation");
            modelBuilder.Entity<Favorite>()
            .ToTable("favorite");
            modelBuilder.Entity<Goods>()
            .ToTable("goods");
            modelBuilder.Entity<Hotel>()
            .ToTable("hotel");
            modelBuilder.Entity<Integral>()
            .ToTable("integral");
            modelBuilder.Entity<Integral_record>()
            .ToTable("integral_record");
            modelBuilder.Entity<Number>()
            .ToTable("number");
            modelBuilder.Entity<OrderInfo>()
            .ToTable("orderinfo");
            modelBuilder.Entity<Originator>()
            .ToTable("originator");
            modelBuilder.Entity<Picture>()
            .ToTable("picture");
            modelBuilder.Entity<Provincelocation>()
            .ToTable("provincelocation");
            modelBuilder.Entity<Questions>()
            .ToTable("questions");
            modelBuilder.Entity<Reply>()
            .ToTable("reply");
            modelBuilder.Entity<RouteInfo>()
            .ToTable("routeinfo");
            modelBuilder.Entity<Scenicpic>()
            .ToTable("scenicpic");
            modelBuilder.Entity<Scenicspot>()
            .ToTable("scenicspot");
            modelBuilder.Entity<Seller>()
            .ToTable("seller");
            modelBuilder.Entity<SmsInfo>()
            .ToTable("smsinfo");
            modelBuilder.Entity<Supplier>()
            .ToTable("supplier");
            modelBuilder.Entity<TeamInfo>()
            .ToTable("teaminfo");
            modelBuilder.Entity<Topcategory>()
            .ToTable("topcategory");
            modelBuilder.Entity<Tour>()
            .ToTable("tour");
            modelBuilder.Entity<Touristroute>()
            .ToTable("touristroute");
            modelBuilder.Entity<Transportation>()
            .ToTable("transportation");
            modelBuilder.Entity<Travelvo>()
            .ToTable("travelvo");
            modelBuilder.Entity<Travelvo_record>()
            .ToTable("travelvo_record");
            modelBuilder.Entity<Usercomment>()
            .ToTable("usercomment");
            modelBuilder.Entity<Voucher>()
            .ToTable("voucher");
            modelBuilder.Entity<Voucher_record>()
            .ToTable("voucher_record");
            modelBuilder.Entity<Webcolumn>()
            .ToTable("webcolumn");
            modelBuilder.Entity<Website>()
            .ToTable("website");
            modelBuilder.Entity<DeliveryAddress>()
            .ToTable("deliveryAddress");
            modelBuilder.Entity<TourPicture>()
            .ToTable("tourpicture");
            modelBuilder.Entity<BeCarefulInfo>()
            .ToTable("becarefulinfo");
            modelBuilder.Entity<HotelDetails>()
            .ToTable("hoteldetails");
            modelBuilder.Entity<RoomInfo>()
            .ToTable("roominfo");
            modelBuilder.Entity<HotelOrder>()
            .ToTable("hotelorder");
            modelBuilder.Entity<GoodsDetails>()
            .ToTable("goodsdetails");
            modelBuilder.Entity<CashOut>()
            .ToTable("cashout");
            modelBuilder.Entity<Admin>()
          .ToTable("admin");
            modelBuilder.Entity<EmailInfo>()
            .ToTable("emailinfo");
            modelBuilder.Entity<OrderOver>()
            .ToTable("orderover");
            
            //throw new UnintentionalCodeFirstException();
        }

        public virtual DbSet<UserInfo> UserInfo { get; set; }
        public virtual DbSet<Arealocation> Arealocation { get; set; }
        public virtual DbSet<Backcolumn> Backcolumn { get; set; }
        public virtual DbSet<Brand> Brand { get; set; }
        public virtual DbSet<Cashnumber> Cashnumber { get; set; }
        public virtual DbSet<Cashnumber_record> Cashnumber_record { get; set; }
        public virtual DbSet<Category> Category { get; set; }
        public virtual DbSet<Cateraccommod> Cateraccommod { get; set; }
        public virtual DbSet<Citylocation> Citylocation { get; set; }
        public virtual DbSet<Colleague> Colleague { get; set; }
        public virtual DbSet<Company> Company { get; set; }
        public virtual DbSet<Countrylocation> Countrylocation { get; set; }
        public virtual DbSet<Favorite> Favorite { get; set; }
        public virtual DbSet<Goods> Goods { get; set; }
        public virtual DbSet<Hotel> Hotel { get; set; }
        public virtual DbSet<Integral> Integral { get; set; }
        public virtual DbSet<Integral_record> Integral_record { get; set; }
        public virtual DbSet<Number> Number { get; set; }
        public virtual DbSet<OrderInfo> OrderInfo { get; set; }
        public virtual DbSet<Originator> Originator { get; set; }
        public virtual DbSet<Picture> Picture { get; set; }
        public virtual DbSet<Provincelocation> Provincelocation { get; set; }
        public virtual DbSet<Questions> Questions { get; set; }
        public virtual DbSet<Reply> Reply { get; set; }
        public virtual DbSet<RouteInfo> RouteInfo { get; set; }
        public virtual DbSet<Scenicpic> Scenicpic { get; set; }
        public virtual DbSet<Scenicspot> Scenicspot { get; set; }
        public virtual DbSet<Seller> Seller { get; set; }
        public virtual DbSet<SmsInfo> SmsInfo { get; set; }
        public virtual DbSet<Supplier> Supplier { get; set; }
        public virtual DbSet<TeamInfo> TeamInfo { get; set; }
        public virtual DbSet<Topcategory> Topcategory { get; set; }
        public virtual DbSet<Tour> Tour { get; set; }
        public virtual DbSet<Touristroute> Touristroute { get; set; }
        public virtual DbSet<Transportation> Transportation { get; set; }
        public virtual DbSet<Travelvo> Travelvo { get; set; }
        public virtual DbSet<Travelvo_record> Travelvo_record { get; set; }
        public virtual DbSet<Usercomment> Usercomment { get; set; }
        public virtual DbSet<Voucher> Voucher { get; set; }
        public virtual DbSet<Voucher_record> Voucher_record { get; set; }
        public virtual DbSet<Webcolumn> Webcolumn { get; set; }
        public virtual DbSet<Website> Website { get; set; }
        public virtual DbSet<DeliveryAddress> DeliveryAddress { get; set; }
        public virtual DbSet<TourPicture> TourPicture { get; set; }
        public virtual DbSet<BeCarefulInfo> BeCarefulInfo { get; set; }
        public virtual DbSet<HotelDetails> HotelDetails { get; set; }
        public virtual DbSet<RoomInfo> RoomInfo { get; set; }
        public virtual DbSet<HotelOrder> HotelOrder { get; set; }
        public virtual DbSet<GoodsDetails> GoodsDetails {get; set;}
        public virtual DbSet<CashOut> CashOut { get; set; }
        public virtual DbSet<EmailInfo> EmailInfo { get; set; }
        public virtual DbSet<OrderOver> OrderOver { get; set; }
        

        public virtual DbSet<Admin> Admin { get; set; }
    }
}
